<script src="https://cdn.bootcss.com/angular.js/1.5.8/angular.js"></script>
<script type="text/javascript">
	var app = app || {};
	app.config = app.config || {};
	app.config.schoolList = <?php echo json_encode($schoolList,JSON_UNESCAPED_UNICODE); ?>;
</script>
<div class="frameBody">
	<table class="tablelist dataTable" style="table-layout: fixed;" id="userCombine" ng-app="userApp" ng-controller="combineCtrl">
		<thead>
			<tr>
				<td style="width: 100px;"></td>
				<th>主账户</th>
				<th>废弃账户</th>
				<th>合并后</th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<th>用户ID</th>
				<td>
					<input type="number" ng-model="mainUser.id" class="scinput1" min="0" string-to-number />
					<button class="ibtn" ng-click="fetchUser('mainUser')">确定</button>
				</td>
				<td>
					<input type="number" ng-model="delUser.id" class="scinput1" min="0" string-to-number />
					<button class="ibtn" ng-click="fetchUser('delUser')">确定</button>
				</td>
				<td>
					<button class="scbtn" ng-click="combine()" ng-show="canBeCombine">合并</button>
					<span ng-bind="tips" ng-show="!canBeCombine"></span>
				</td>
			</tr>
			<tr>
				<th>昵称</th>
				<td><b ng-bind="mainUser.nickname"></b></td>
				<td><b ng-bind="delUser.nickname"></b></td>
				<td><b ng-bind="comUser.nickname"></b></td>
			</tr>
			<tr class="headImg-tr">
				<th>头像</th>
				<td><img ng-show="mainUser.headImgUrl" ng-src="{{mainUser.headImgUrl}}" /></td>
				<td><img ng-show="delUser.headImgUrl" ng-src="{{delUser.headImgUrl}}" /></td>
				<td><img ng-show="comUser.headImgUrl" ng-src="{{comUser.headImgUrl}}" /></td>
			</tr>
			<tr ng-repeat="(field, text) in items"	>
				<th ng-bind="text"></th>
				<td ng-bind="mainUser[field]"></td>
				<td ng-bind="delUser[field]"></td>
				<td ng-bind="comUser[field]"></td>
			</tr>
		</tbody>
	</table>
</div>
<script src="/houtai/lib/common_ng.js"></script>
<script src="/houtai/js/user/combine.js"></script>


